package com.cda.service.impl;

import com.cda.dao.DeviceinfoDao;
import com.cda.entity.DeviceinfoEntity;
import com.cda.service.DeviceinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by peiming on 2019/3/6.
 */
@Service("deviceinfoService")
@Transactional
public class DeviceinfoServiceImpl implements DeviceinfoService {


    @Autowired
    DeviceinfoDao deviceinfoDao;

    @Cacheable( value = "cache" )
    public DeviceinfoEntity findByIp(String ip) {

        System.out.println("【进入查询人脸设备表】"+ip);
        return  deviceinfoDao.findByIp(ip);

    }


}
